package br.com.winesys.geta.databinding.component.editor;

import java.text.ParseException;

public class IntegerEditor extends NumberEditor {

    public IntegerEditor() {
        super();
        setFormat("#,##0");
    }

    @Override
    public Object getValue() {
        try {
            Object value = getText();
            return this.numberFormat.parse(value.toString()).intValue();
        } catch (ParseException ex) {
            return null;
        }
    }
}
